//
//  DYZCarContentCell.m
//  DYZCars
//
//  Created by jdc on 16/8/20.
//  Copyright © 2016年 MF. All rights reserved.
//

#import "DYZCarContentCell.h"

@implementation DYZCarContentCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        [self setupUI];
    }
    return self;
}

-(void)setupUI{
    //keyLable添加
    UILabel *keyLable = [[UILabel alloc]init];
    keyLable.text = @"key";
    keyLable.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:keyLable];
    [keyLable sizeToFit];
    [keyLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(10);
        make.centerY.equalTo(self.contentView);
    }];
    //valueLable添加
    UILabel *valueLable = [[UILabel alloc]init];
    valueLable.text = @"value";
    valueLable.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:valueLable];
    valueLable.numberOfLines = 0;
    [valueLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(90);
        make.right.offset(30);
        make.centerY.equalTo(self.contentView);
    }];
    //赋值
    self.keyLable = keyLable;
    self.valueLable = valueLable;

}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
